<template>
    <div class="all">
        <div class="item" v-for="item in props.list" :key="item?.goodsId">
            <div class="img">
                <img :src="item?.goodsLogo">
            </div>
            <div>
                <span>{{ item?.goodsName }}</span>
                <p>价格：{{ item?.goodsPrice }} 收藏：{{ item?.goodsFav }}</p>
            </div>
        </div>
    </div>
</template>

<script lang="ts" setup>
import { type CatsTree } from '@/api';
const props = defineProps<{
    // 数据
    list: CatsTree.myGoods
}>()


</script>

<style lang="scss" scoped>
.all {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    background-color: #ededed;
}

.item {
    width: 49%;
    height: 100%;
    padding: 10px 0 10px 10px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    .img {
        margin: 0;
        box-sizing: border-box;
    }

    img {
        width: 100%;
        height: 100%;
        display: block;

    }
}
</style>